# $Id: PKGBUILD 84301 2013-02-15 22:17:20Z kkeen $
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>

pkgname=ngircd
pkgver=20.2
pkgrel=1
pkgdesc="Next Generation IRC Daemon"
arch=('x86_64' 'i686')
backup=(etc/ngircd.conf)
url="http://ngircd.barton.de/"
license=('GPL')
depends=('openssl' 'libident')
source=("http://ngircd.barton.de/pub/ngircd/ngircd-$pkgver.tar.gz"
        ngircd.sh
        ngircd.service)
sha256sums=('306c0ef0d2ceac0836a84ecf871a6bc4dd16c25683aa87c0f172b6e68b93357d'
            'f8c28546090af8ce67471b9b4d577f6926007615356dd11afd2bc16f61d698d5'
            '13ffad9647ef42d1a9c8f01f6208bef9dfe9e0f86dce9a01f72711d813d720a0')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure --prefix=/usr \
  	--sysconfdir=/etc \
  	--mandir=/usr/share/man \
  	--with-ident \
  	--with-openssl \
  	--enable-ipv6
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
  install -Dm 755 ../ngircd.sh "$pkgdir/etc/rc.d/ngircd"
  install -Dm 755 ../ngircd.service "$pkgdir/usr/lib/systemd/system/ngircd.service"
}

# vim:set ts=2 sw=2 et:
